package com.wuhunyu.client;

import com.wuhunyu.client.err.VideoServiceClientErr;
import com.wuhunyu.commonutils.result.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 远程调用视频上传服务接口
 *
 * @author wuhunyu
 * @version 1.0
 * @date 2021-01-21 10:58
 */
@FeignClient(name = "service-video", fallback = VideoServiceClientErr.class)
@Component
public interface VideoServiceClient {

    /**
     * 删除视频点播服务器中的视频
     *
     * @param videoId
     * @return
     */
    @DeleteMapping("/video/deleteVideo/{videoId}")
    public CommonResult deleteVideo(@PathVariable("videoId") String videoId);

    /**
     * 批量删除视频
     *
     * @param ids
     * @return
     */
    @DeleteMapping("/video/deleteVideos")
    public CommonResult deleteVideos(@RequestBody(required = false) List<String> ids);

}
